function getIE(obj){ 
        var t=obj.offsetTop - obj.parentElement.scrollTop; 
        var l=obj.offsetLeft - obj.parentElement.scrollLeft; 
        while(obj=obj.offsetParent){ 
            t+=obj.offsetTop - obj.parentElement.scrollTop; 
            l+=obj.offsetLeft - obj.parentElement.scrollLeft; 
        } 
        return {top: t, left:l} 
    }; 

function create_div(){ 
    var div = document.createElement('div'); 
    var b    = document.createElement('b'); 
    with(div.style){position = 'absolute';zIndex = '99999';borderTop='2px #FFc739 solid';width ='98px';height = '1px';pixelTop = '-100';pixelLeft = '-100';} 
    div.id='_CARD_HR_'; 
    div.appendChild(b); 
    document.body.insertAdjacentElement('afterBegin', div); 
}; 

function set_tab_card(TabIndex){ 
    var tab = document.getElementById('TabCard'); 
    var bod = document.getElementById('TabBody'); 
    var car = (typeof(TabIndex) != 'object')?tab.children[TabIndex]:TabIndex; 
    var X_Y = getIE(car); 
    if(typeof(_CARD_HR_) == 'undefined')create_div(); 
    _CARD_HR_.style.pixelTop = X_Y.top;+20; 
    _CARD_HR_.style.pixelLeft = X_Y.left+1; 
    for(var i=0; i < tab.children.length; i++){ 
        tab.children[i].style.backgroundColor = (tab.children[i] == car)?'#FFF':'#CCC'; 
        bod.children[i].style.display = (tab.children[i] == car)?'block':'none'; 
    } 
}; 